import requests
from config import url_cloud,headers_web

class LaboratoryAdmittanceTestPaper:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web
    @classmethod
    def post_saveOrUpdateTestPaper(cls,url_cloud: str,headers= headers_web, params= None,json= None):
        '''
        summary:根据准入规则保存或更新试卷信息
        description:"1.云课堂管理端"
        :param url_cloud:
        :param headers:
        :param params:
        :return:
        '''
        url = url_cloud + "/teachinglaboratoryapi/teachinglaboratoryapi/v1/laboratoryadmittancetestpaper"
        r = requests.post(url=url, headers=headers, params=params,json=json)
        return r

    @classmethod
    def get_testPaper(cls,url_cloud: str,headers= headers_web, params= None):
        '''
        summary:根据准入规则获取试卷信息
        description:"1.云课堂管理端"
        :param url_cloud:
        :param headers:
        :param params:
        :return:
        '''
        url = url_cloud + "/teachinglaboratoryapi/teachinglaboratoryapi/v1/laboratoryadmittancetestpaper"
        r = requests.get(url=url, headers=headers, params=params)
        return r